#!/bin/sh -e

./configure \
    --prefix=/usr \
    --without-nettle \
    --without-openssl \
    --without-xml2 \
    --without-expat

# Link binaries statically
make bsdtar_LDFLAGS=-all-static \
     bsdcat_LDFLAGS=-all-static \
     bsdcpio_LDFLAGS=-all-static
make DESTDIR="$1" install

ln -s bsdcat  "$1/usr/bin/cat"
ln -s bsdcpio "$1/usr/bin/cpio"
ln -s bsdtar  "$1/usr/bin/tar"
